import request from '@/utils/request'



///system/appointment/{treatmentAppointmentId} 获取治疗预约详细信息
export function getAppointment(treatmentAppointmentId) {
  return request({
    url: '/system/appointment/' + treatmentAppointmentId,
    method: 'get'
  })
}
///system/appointment/get/user/treatment/appointment/info   用户预约信息
export function listAllAppointment(query) {
    return request({
        url: '/system/appointment/get/user/treatment/appointment/info',
        method: 'get',
        params: query
      })
  }
  ///system/appointment/treatment/appointment/plan/list  已治疗预约项目
  export function listPlansAppointment(query) {
    return request({
        url: '/system/appointment/treatment/appointment/plan/list',
        method: 'get',
        params: query
      })
  }
// /system/appointment 新增治疗预约
export function addAppointment(data) {
  return request({
    url: '/system/appointment',
    method: 'post',
    data: data
  })
}
//system/appointment/update/sysTreatmentAppointmentStateById //修改预约状态
export function updateSysTreatmentAppointmentStateById(data) {
  return request({
    url: '/system/appointment/update/sysTreatmentAppointmentStateById',
    method: 'post',
    data: data
  })
}
///system/appointment   修改治疗预约
export function updateAppointment(data) {
  return request({
    url: '/system/appointment',
    method: 'put',
    data: data
  })
}

///system/appointment/{treatmentAppointmentIds} 删除治疗预约
export function delAppointment(treatmentAppointmentIds) {
  return request({
    url: '/system/appointment/' + treatmentAppointmentIds,
    method: 'delete'
  })
}
///system/appointment/last/time/appointment  用户最近一次预约信息
export function latestAppointment(query) {
  return request({
      url: '/system/appointment/last/time/appointment',
      method: 'get',
      params: query
    })
}
//system/appointment/scheduling/get/scheduling/info  获取排班明细诊间预约时使用
export function appointmentScheduling(data) {
  return request({
    url: '/system/appointment/scheduling/get/scheduling/info',
    method: 'post',
    data: data
  })
}

///system/appointment/info/list 查询治疗预约明细列表
export function appointmentListInfo(query) {
  return request({
    url: '/system/appointment/info/list',
    method: 'get',
    params: query
  })
}

///system/appointment/automatic/add  自动新增治疗预约
export function appointmentAutomatic(data) {
  return request({
    url: '/system/appointment/automatic/add',
    method: 'post',
    data: data
  })
}

///system/appointment/automatic/info/{planId} 自动治疗预约项目信息
export function getAppointmentautomaticInfo(planId,patientld ) {
  return request({
    url: '/system/appointment/automatic/info/' + planId+'/'+patientld,
    method: 'get'
  })
}

///system/appointment/get/appointment/num  预约数量

export function getAppointmentNum(query) {
  return request({
    url: '/system/appointment/get/appointment/num',
    method: 'get',
    params: query
  })
}